package com.njym.java.security.app.mapper;


import com.njym.java.security.app.entity.GroupsMsgContent;
import com.njym.java.security.app.entity.UserMessage;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 
 * 
 * @author lijie
 * @email 717057076@qq.com
 * @date 2019-11-22 16:44:11
 */

public interface GroupsMsgContentMapper extends Mapper<GroupsMsgContent> {
    /**
     * 添加群消息
     * @param groupsMsgContent
     * @return
     */
	int insertGroupMessage(GroupsMsgContent groupsMsgContent);

    /**
     * 查询群历史消息
     * @param groupId
     * @return
     */
    List<GroupsMsgContent> queryGroupHistory(@Param("groupId") Integer groupId);
    int countGroupHistory(@Param("groupId") Integer groupId);

    /**
     * 删除群聊记录
     * @param groupId
     * @return
     */
    int deleteByGroupId(@Param("groupId") Integer groupId);

    /**
     * 删除群聊记录
     * @param groupId
     * @param fromId
     * @return
     */
    int deleteByFromId(@Param("groupId") Integer groupId, @Param("fromId") Integer fromId);
}
